package com.gopay.bis.cmb.bcdl.impl;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.naming.CommunicationException;
import com.gopay.bis.cmb.bcdl.operation.CmbB2bQueryNtnstqryHelper;
import com.gopay.common.cipher.utils.LoggerMaskUtils;
import com.gopay.common.domain.bank.cmb.ebank.queryNtnstqry.CmbDownLoadMessage;
import com.gopay.common.util.DateUtils;
import com.gopay.common.util.ReadWrite;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.gopay.bis.cmb.bcdl.operation.Transformer;
import com.gopay.bis.cmb.bcdl.operation.doc.CmbAgentPayBean;
import com.gopay.bis.cmb.bcdl.operation.doc.CmbXmlBean;
import com.gopay.bis.common.trace.PaymentLog;
import com.gopay.common.constants.bank.BankConstants;
import com.gopay.common.constants.bank.BankLogConstants;
import com.gopay.common.constants.bank.BisBankInterfaceChannel;
import com.gopay.common.constants.bank.CmbConstants;
import com.gopay.common.constants.proccode.ProcCodeConstants;
import com.gopay.common.domain.bank.BisBankReturnVo;
import com.gopay.common.domain.bank.cmb.bcdl.CmbBcdlMessage;
import com.gopay.common.exception.GopayException;
import com.gopay.common.util.HttpTransport;
import com.gopay.remote.bank.businesses.BcdlService;
import com.thoughtworks.xstream.XStream;

public class CmbBcdlServiceImpl  implements BcdlService {
    private final static Logger logger = LoggerFactory.getLogger("BANK_LOG");
    Transformer transformer;
    HttpTransport transport;
    private String url;
    private int timeout = 15000;
    private static String XML_HEAD = "<?xml version=\"1.0\" encoding=\"GBK\"?>";
    private static String channles = "http://211.88.2.89:10000/";
    private List<String> urls;
    private Map<String, String> logNames;
    private CmbB2bQueryNtnstqryHelper cmbB2bQueryNtnstqryHelper;
    //kafka开关
    private String kafkaSwitch;

    @Override
    public Object eft(Object obj) throws GopayException {
        CmbBcdlMessage msg = (CmbBcdlMessage) obj;
        String another = "";
        String url = "";
        String name = "";

        for (String str : urls) {
            if (channles.startsWith(str)) {
                name = logNames.get(str);
                url = str;
            } else {
                another = str;
            }
        }

        try {
            // 对公(直接支付接口)
            if (BankConstants.DCBL_CORP == msg.getDcblType()) {
                String formatRes = XML_HEAD + transformer.doFormat((CmbBcdlMessage) msg, name);
                byte[] sendMsg = formatRes.getBytes("GBK");
                transport.setUrl(url);
                transport.setTimeout(timeout);
                Object issueRes = transport.submit(sendMsg);
                String resMsg = new String(((String) issueRes).getBytes("GBK"), "UTF-8");
                CmbBcdlMessage msgRet = transformer.parse(resMsg.trim());
                logger.error("=======cmb res:" + LoggerMaskUtils.maskString(ToStringBuilder.reflectionToString(msgRet)));
                msg.setFlag(msgRet.isFlag());
                //add by zyt,2017-10-24，返回msg中设置两个参数
                msg.setReqStatus(msgRet.getReqStatus());
                msg.setRetCode(msgRet.getRetCode());
                saveEftCKafkaInfo(obj,(String)issueRes);
                if ("-1".equals(msgRet.getRetCode())) {
                    // 连接主机失败,切换前置机
                    channles = another;
                    throw new GopayException(ProcCodeConstants.PROC_CODE_100E6082, "队列已满请求银行失败, 连接前置机" + url);
                }
            }
            // 对私(直接代发接口)
            else if (BankConstants.DCBL_PERSON == msg.getDcblType()) {
                String formatRes = XML_HEAD + transformer.doAgentPayFormat((CmbBcdlMessage) msg, name);
                byte[] sendMsg = formatRes.getBytes("GBK");
                transport.setUrl(url);
                transport.setTimeout(timeout);
                Object issueRes = transport.submit(sendMsg);
                String resMsg = new String(((String) issueRes).getBytes("GBK"), "UTF-8");
                CmbBcdlMessage msgRet = transformer.agentPayParse(resMsg.trim());
                msg.setFlag(msgRet.isFlag());
                saveEftPKafkaInfo(obj,(String)issueRes);
                if ("-1".equals(msgRet.getRetCode())) {
                    // 连接主机失败,切换前置机
                    channles = another;
                    throw new GopayException(ProcCodeConstants.PROC_CODE_100E6082, "队列已满请求银行失败, 连接前置机" + url);
                }
            } else {
                return null;
            }
        } catch (GopayException e) {
            throw e;
        } catch (CommunicationException ex) {
            channles = another;
            throw new GopayException(ProcCodeConstants.PROC_CODE_100E6047, "连接前置机" + url);
        } catch (Exception e) {
            logger.error("CmbBcdlServiceImpl eft error: ", e);
            throw new GopayException(ProcCodeConstants.PROC_CODE_100E6049);
        }
        return msg;
    }

   
    /**
     * 将对私付款返回的报文记录到kafka中
     * @param obj
     * @param plainText
     */
    private void saveEftPKafkaInfo(Object obj, String plainText) {
    	try {
    		CmbAgentPayBean xmlBean = new CmbAgentPayBean();
    		XStream xstream = new XStream();
    		xstream.autodetectAnnotations(true);
    		xstream.processAnnotations(CmbAgentPayBean.class);
    		xmlBean = (CmbAgentPayBean) xstream.fromXML(plainText);
    		CmbBcdlMessage baseMsg = (CmbBcdlMessage) obj;
    		
			BisBankReturnVo vo = new BisBankReturnVo();
			//国付宝订单号
			vo.setGopayOrderId(baseMsg.getOrderId());
			//银行返回订单号
			vo.setBankOrderId(baseMsg.getOrderId());
			//银行渠道
			vo.setBankChannel(BisBankInterfaceChannel._00.value);
			//银行编码
			vo.setBankCode(BankLogConstants.BANK_LOG_BCDL_P_EFT_CMB);
			//银行返回错误的xml文件信息
			vo.setBankReturnXml(plainText);
			if(xmlBean!=null&&xmlBean.getInfo()!=null){
				//银行返回错误码
				vo.setRsCode(xmlBean.getInfo().getRetCod()); //指令状态
				//银行返回的错误信息
				vo.setRsMsg(xmlBean.getInfo().getErrMsg()); //交易返回描述
			}
			//银行报文订单返回时间
			vo.setBankReturnDate(DateUtils.getCurrDate("yyyy-MM-dd HH:mm:ss"));
			//报文返回记录日志时间  时间格式：yyyy-MM-dd HH:mm:ss
			vo.setCreateTsErr(DateUtils.getCurrDate("yyyy-MM-dd HH:mm:ss"));
			//保存到kafka中
			PaymentLog.info(vo,kafkaSwitch);
		} catch (Exception e) {
			logger.error("招行对私付款返回的报文记录到kafka异常："+e);
		}
		
	}

	
    /**
     * 将对公付款返回的报文记录到kafka中
     * @param obj
     * @param plainText
     */
    private void saveEftCKafkaInfo(Object obj,String plainText) {
    	try {
    		CmbXmlBean xmlBean = new CmbXmlBean();
    		XStream xstream = new XStream();
    		xstream.autodetectAnnotations(true);
    		xstream.processAnnotations(CmbXmlBean.class);
    		xmlBean = (CmbXmlBean) xstream.fromXML(plainText);
    		CmbBcdlMessage baseMsg = (CmbBcdlMessage) obj;
			BisBankReturnVo vo = new BisBankReturnVo();
			//国付宝订单号
			vo.setGopayOrderId(baseMsg.getOrderId());
			//银行返回订单号
			vo.setBankOrderId(baseMsg.getOrderId());
			//银行渠道
			vo.setBankChannel(BisBankInterfaceChannel._00.value);
			//银行编码
			vo.setBankCode(BankLogConstants.BANK_LOG_BCDL_C_EFT_CMB);
			//银行返回错误的xml文件信息
			vo.setBankReturnXml(plainText);
			if(xmlBean!=null&&xmlBean.getInfo()!=null){
				//银行返回错误码
				vo.setRsCode(xmlBean.getInfo().getRetCod()); //指令状态
				//银行返回的错误信息
				vo.setRsMsg(xmlBean.getInfo().getErrMsg()); //交易返回描述
			}
			if(xmlBean!=null&&xmlBean.getNtqPayRqz()!=null){
				vo.setRemark(xmlBean.getNtqPayRqz().getReqSts()+"="+xmlBean.getNtqPayRqz().getRtnFlg());
			}
			//银行报文订单返回时间
			vo.setBankReturnDate(DateUtils.getCurrDate("yyyy-MM-dd HH:mm:ss"));
			//报文返回记录日志时间  时间格式：yyyy-MM-dd HH:mm:ss
			vo.setCreateTsErr(DateUtils.getCurrDate("yyyy-MM-dd HH:mm:ss"));
			//保存到kafka中
			PaymentLog.info(vo,kafkaSwitch);
		} catch (Exception e) {
			logger.error("招行对公付款返回的报文记录到kafka异常："+e);
		}
	}

	@Override
    public Object query(Object obj) throws GopayException {
        CmbBcdlMessage msg = (CmbBcdlMessage) obj;
        String another = "";
        String url = "";
        String name = "";

        for (String str : urls) {
            if (channles.startsWith(str)) {
                name = logNames.get(str);
                url = str;
            } else {
                another = str;
            }
        }
        try {
            // 对公(直接支付接口)
            if (BankConstants.DCBL_CORP == msg.getDcblType()) {
                String formatRes = XML_HEAD + transformer.doQueryFormat(msg, name);
                byte[] sendMsg = formatRes.getBytes("GBK");
                transport.setUrl(url);
                transport.setSendEncoding("GBK");
                Object issueRes = transport.submit(sendMsg);
                String resMsg = new String(((String) issueRes).getBytes("GBK"), "UTF-8");
                msg = transformer.doQueryParse(resMsg.trim(), msg);
                saveQueryCKafkaInfo(obj,(String)issueRes);
                if ("-1".equals(msg.getRetCode())) {
                    // 连接主机失败,切换前置机
                    channles = another;
                    throw new GopayException(ProcCodeConstants.PROC_CODE_100E6082, "队列已满请求银行失败, 连接前置机" + url);
                }
            }
            // 对私(直接代发接口)
            else if (BankConstants.DCBL_PERSON == msg.getDcblType()) {
                String formatRes = XML_HEAD + transformer.doAgentQueryFormat(msg, name);
                byte[] sendMsg = formatRes.getBytes("GBK");
                transport.setUrl(url);
                transport.setSendEncoding("GBK");
                Object issueRes = transport.submit(sendMsg);
                String resMsg = new String(((String) issueRes).getBytes("GBK"), "UTF-8");
                msg = transformer.doAgentQueryParse(resMsg.trim(), msg);
                saveQueryPKafkaInfo(obj,(String)issueRes);
                if ("-1".equals(msg.getRetCode())) {
                    // 连接主机失败,切换前置机
                    channles = another;
                    throw new GopayException(ProcCodeConstants.PROC_CODE_100E6082, "队列已满请求银行失败, 连接前置机" + url);
                }

                if ((CmbConstants.FIN.equals(msg.getReqStatus()) && CmbConstants.FAIL.equals(msg.getRetCode()))) {
                    formatRes = XML_HEAD + transformer.doAgentQueryDetailFormat(msg, name);
                    transport.setUrl(url);
                    transport.setSendEncoding("GBK");
                    sendMsg = formatRes.getBytes("GBK");
                    issueRes = transport.submit(sendMsg);
                    String errMsg = transformer.doAgentDetailQueryParse((String) issueRes);
                    msg.setRetMsg(errMsg);
                }
            } else {
                return null;
            }
        } catch (GopayException e) {
            throw e;
        } catch (CommunicationException ex) {
            channles = another;
            throw new GopayException(ProcCodeConstants.PROC_CODE_100E6047, "连接前置机" + url);
        } catch (Exception e) {
            logger.error("CmbBcdlServiceImpl query error: ", e);
            throw new GopayException(ProcCodeConstants.PROC_CODE_100E6049);
        }
        return msg;
    }

    /**
     * 将对私查询返回的报文记录到kafka中
     * @param obj
     * @param plainText
     */
    private void saveQueryPKafkaInfo(Object obj, String plainText) {
    	try {
    		CmbAgentPayBean xmlBean = new CmbAgentPayBean();
    		XStream xstream = new XStream();
    		xstream.autodetectAnnotations(true);
    		xstream.ignoreUnknownElements();
    		xstream.processAnnotations(CmbAgentPayBean.class);
    		xmlBean = (CmbAgentPayBean) xstream.fromXML(plainText);
    		CmbBcdlMessage baseMsg = (CmbBcdlMessage) obj;
    		
			BisBankReturnVo vo = new BisBankReturnVo();
			//国付宝订单号
			vo.setGopayOrderId(baseMsg.getOrderId());
			//银行返回订单号
			vo.setBankOrderId(baseMsg.getOrderId());
			//银行渠道
			vo.setBankChannel(BisBankInterfaceChannel._00.value);
			//银行编码
			vo.setBankCode(BankLogConstants.BANK_LOG_BCDL_P_QUERY_CMB);
			//银行返回错误的xml文件信息
			vo.setBankReturnXml(plainText);
			if(xmlBean!=null&&xmlBean.getInfo()!=null){
				//银行返回错误码
				vo.setRsCode(xmlBean.getInfo().getRetCod()); 
				//银行返回的错误信息
				vo.setRsMsg(xmlBean.getInfo().getErrMsg()); 
			}
			if(xmlBean!=null&&xmlBean.getNtqAtsQyz()!=null){
				vo.setRemark(xmlBean.getNtqAtsQyz().getReqSta()+"="+xmlBean.getNtqAtsQyz().getRtnFlg());
				//交易返回描述
				vo.setRsMsg(xmlBean.getNtqAtsQyz().getErrdsp()); 
			}
			//银行报文订单返回时间
			vo.setBankReturnDate(DateUtils.getCurrDate("yyyy-MM-dd HH:mm:ss"));
			//报文返回记录日志时间  时间格式：yyyy-MM-dd HH:mm:ss
			vo.setCreateTsErr(DateUtils.getCurrDate("yyyy-MM-dd HH:mm:ss"));
			//保存到kafka中
			PaymentLog.info(vo,kafkaSwitch);
		} catch (Exception e) {
			logger.error("招行对私查询返回的报文记录到kafka异常："+e);
		}
	}


	/**
     * 将对公查询返回的报文记录到kafka中
     * @param obj
     * @param plainText
     */
    private void saveQueryCKafkaInfo(Object obj, String plainText) {
    	try {
    		CmbXmlBean xmlBean = new CmbXmlBean();
    		XStream xstream = new XStream();
    		xstream.autodetectAnnotations(true);
    		xstream.ignoreUnknownElements();
    		xstream.processAnnotations(CmbXmlBean.class);
    		xmlBean = (CmbXmlBean) xstream.fromXML(plainText);
    		CmbBcdlMessage baseMsg = (CmbBcdlMessage) obj;
    		
			BisBankReturnVo vo = new BisBankReturnVo();
			//国付宝订单号
			vo.setGopayOrderId(baseMsg.getOrderId());
			//银行返回订单号
			vo.setBankOrderId(baseMsg.getOrderId());
			//银行渠道
			vo.setBankChannel(BisBankInterfaceChannel._00.value);
			//银行编码
			vo.setBankCode(BankLogConstants.BANK_LOG_BCDL_C_QUERY_CMB);
			//银行返回错误的xml文件信息
			vo.setBankReturnXml(plainText);
			if(xmlBean!=null&&xmlBean.getInfo()!=null){
				//银行返回错误码
				vo.setRsCode(xmlBean.getInfo().getRetCod()); 
				//银行返回的错误信息
				//vo.setRsMsg(xmlBean.getInfo().getErrMsg()); 
			}
			if(xmlBean!=null&&xmlBean.getNtqPayQyz()!=null){
				vo.setRemark(xmlBean.getNtqPayQyz().getReqSts()+"="+xmlBean.getNtqPayQyz().getRtnFlg());
				//交易返回描述
				vo.setRsMsg(xmlBean.getNtqPayQyz().getRtnNar()); 
			}
			//银行报文订单返回时间
			vo.setBankReturnDate(DateUtils.getCurrDate("yyyy-MM-dd HH:mm:ss"));
			//报文返回记录日志时间  时间格式：yyyy-MM-dd HH:mm:ss
			vo.setCreateTsErr(DateUtils.getCurrDate("yyyy-MM-dd HH:mm:ss"));
			//保存到kafka中
			PaymentLog.info(vo,kafkaSwitch);
		} catch (Exception e) {
			logger.error("招行对公查询返回的报文记录到kafka异常："+e);
		}
		
	}


	@Override
    public Object queryBalance(Object object) throws GopayException {
        CmbBcdlMessage msg = (CmbBcdlMessage) object;
        String another = "";
        String url = "";
        String name = "";

        for (String str : urls) {
            if (channles.startsWith(str)) {
                name = logNames.get(str);
                url = str;
            } else {
                another = str;
            }
        }
        try {
            // 查询余额
            String formatRes = XML_HEAD + transformer.doQueryBalanceFormat(msg, name);
            byte[] sendMsg = formatRes.getBytes("GBK");
            transport.setUrl(url);
            transport.setSendEncoding("GBK");
            transport.setTimeout(timeout);
            Object issueRes = transport.submit(sendMsg);
            String resMsg = new String(((String) issueRes).getBytes("GBK"), "UTF-8");
            msg = transformer.doQueryBalanceParse(resMsg.trim(), msg);
        } catch (CommunicationException ex) {
            throw new GopayException(ProcCodeConstants.PROC_CODE_100E6051, "连接前置机" + url);
        } catch (Exception e) {
            logger.error("CmbBcdlServiceImpl queryBalance error: ", e);
            throw new GopayException(ProcCodeConstants.PROC_CODE_100E6049);
        }
        return msg;
    }

    public Transformer getTransformer() {
        return transformer;
    }

    public void setTransformer(Transformer transformer) {
        this.transformer = transformer;
    }

    public HttpTransport getTransport() {
        return transport;
    }

    public void setTransport(HttpTransport transport) {
        this.transport = transport;
    }

    public List<String> getUrls() {
        return urls;
    }

    public void setUrls(List<String> urls) {
        this.urls = urls;
    }

    public Map<String, String> getLogNames() {
        return logNames;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public void setLogNames(Map<String, String> logNames) {
        this.logNames = logNames;
    }

    @Override
    public Object packetEft(Object object) throws GopayException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Object queryPacket(Object object) throws GopayException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Object queryAcctDetail(Object object) throws GopayException {
        CmbBcdlMessage msg = (CmbBcdlMessage) object;
        msg.setLoginName("X_GL");
        logger.info("queryAcctDetail queryDownload 接收参数-----------msg:" + msg.getRemark());
        CmbDownLoadMessage cmdDownLoadmsg = CmbB2bQueryNtnstqryHelper.getMsg(msg.getRemark());
        String excel_Path = CmbB2bQueryNtnstqryHelper.cmbexcelPath + DateUtils.format(new Date(), "yyyy-MM-dd") + "/";
        String fileNameExcel = "CMB_DCBL_" + msg.getOrderDate() + "_" + CmbB2bQueryNtnstqryHelper.getGregorianCalendar() + "_" + cmdDownLoadmsg.getDateTypes() + ".xls"; //文件名
        String fileNameXML = "CMB_DCBL_" + msg.getOrderDate() + "_" + CmbB2bQueryNtnstqryHelper.getGregorianCalendar() + "_" + cmdDownLoadmsg.getDateTypes() + ".xml"; //文件名
        String fileNamePathExcel = excel_Path + fileNameExcel;
        String fileNamePathXML = excel_Path + fileNameXML;
        String another = "";
        String name = "";
        int trsseq = 0;
        Map<String, Object> map = null;

//        for (String str : urls) {
//            if (channles.startsWith(str)) {
//                name = logNames.get(str);
//                url = str;
//            } else {
//                another = str;
//            }
//        }
       String  urlS = "http://211.88.23.21:10000";
        int i = 0;
        try {
            //先判断exce是否存在,存在则直接发送邮件,不需要调用查询银行接口
            if (CmbB2bQueryNtnstqryHelper.getExcel(cmdDownLoadmsg, fileNamePathExcel, fileNamePathXML, excel_Path, fileNameExcel) == true) {
                msg.setRetCode("0");
                return msg;
            }
            if (cmdDownLoadmsg.getQuerySize() != 0) {
                for (int j = 0; j <= cmdDownLoadmsg.getQuerySize(); j++) {
                    String formatRes = XML_HEAD + CmbB2bQueryNtnstqryHelper.buildQuerqryxReqyXml(msg, name, trsseq);
                    byte[] sendMsg = formatRes.getBytes("GBK");
                    transport.setUrl(urlS);
                    transport.setSendEncoding("GBK");
                    logger.info("CmbBcdlServiceImpl  queryDownload send----" + formatRes);
                    //发送前置机
                    Object issueRes = transport.submit(sendMsg);
                    logger.info("CmbBcdlServiceImpl  queryDownload return" + issueRes);
                    String resXml = issueRes.toString();
                    map = CmbB2bQueryNtnstqryHelper.getResulXml(resXml, "INFO");
                    logger.info("CmbBcdlServiceImpl  queryDownload map" + map);
                    //返回0代表成功 其他都是失败
                    if (map.get("RETCOD").equals("0")) {
                        //记事本存入服务器
                        ReadWrite.write(excel_Path, fileNamePathXML, resXml + "/-/");
                        Map<String, Object> mapCotflg = CmbB2bQueryNtnstqryHelper.getResulXml(resXml, "NTRBPTRSZ1");
                        //断点续传使用，以上一次查询返回的NTRBPTRSZ1接口中的记账序号，+1后填入本次查询，首次查询填0或者为空，注意交易日切换后，记账序号又须从0起查。
                        trsseq = Integer.valueOf(mapCotflg.get("TRSSEQ").toString()) + 1;
                        if (mapCotflg.get("COTFLG") != null) {
                            logger.info("交易查询状态:" + mapCotflg.get("COTFLG"));
                            //如为Y则表示查询交易日在本次查询完成后，还有数据未查，为N则表示已查完交易日的所有交易
                            if (mapCotflg.get("COTFLG").equals("N")) {
                                logger.info("开始组装数据包装成excel格式  ");
                                //组装数据包装成excel格式
                                CmbB2bQueryNtnstqryHelper.exportFeedBack(excel_Path, fileNamePathExcel, fileNameExcel, fileNamePathXML);
                                //发送邮件服务
                                CmbB2bQueryNtnstqryHelper.sendMessage(cmdDownLoadmsg, fileNameExcel, excel_Path);
                                msg.setRetCode(map.get("RETCOD").toString());
                                msg.setRetMsg(map.get("ERRMSG").toString());
                                break;
                            }
                        }
                    } else {
                        //-1提交主机失败 -2执行失败 -3	数据格式错误 -4尚未登录系统  -5请求太频繁 -6不是证书卡用户 -7用户取消操作 -9其它错误
                        logger.error("CmbBcdlServiceImpl queryDownload error : RETCOD=" + map.get("RETCOD").toString() + "-----ERRMSG=" + map.get("ERRMSG").toString());
                        throw new GopayException(ProcCodeConstants.PROC_CODE_100E6049);
                    }
                    logger.info("执行到第:" + i++ + " 页执行总共的条数=" + trsseq);
                }
            } else {
                logger.info("cmdDownLoadmsg.getQuerysize() 的值为=:" + cmdDownLoadmsg.getQuerySize());
                throw new GopayException(ProcCodeConstants.PROC_CODE_100E6049);
            }
            if ("-1".equals(msg.getRetCode())) {
                // 连接主机失败,切换前置机
              //  channles = another;
                throw new GopayException(ProcCodeConstants.PROC_CODE_100E6082, "队列已满请求银行失败, 连接前置机" + urlS);
            } else {
                return msg;
            }
        } catch (GopayException e) {
            throw e;
        } catch (CommunicationException ex) {
           // channles = another;
            throw new GopayException(ProcCodeConstants.PROC_CODE_100E6047, "连接前置机" + urlS);
        } catch (Exception e) {
            logger.error("CmbBcdlServiceImpl queryDownload error: ", e);
            throw new GopayException(ProcCodeConstants.PROC_CODE_100E6049);
        }
    }

	public String getKafkaSwitch() {
		return kafkaSwitch;
	}

	public void setKafkaSwitch(String kafkaSwitch) {
		this.kafkaSwitch = kafkaSwitch;
	}

}

 